/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.posplus.losspreventiondataimporter.service;

import com.posplus.lossprevention.dao.DepartmentsDAO;
import com.posplus.strack.POSDAOFactory;
import com.posplus.strack.dao.DepartmentDAO;
import com.posplus.strack.mapping.Department;
import java.util.List;

/**
 *
 * @author scottw
 */
public class DepartmentService {

    private DepartmentDAO departmentDAO;
    
    public DepartmentService(POSDAOFactory svtFactory){
        this.departmentDAO = svtFactory.getDepartmentDAO();
    }
    
    public DepartmentService(DepartmentDAO departmentDAO){
        this.departmentDAO = departmentDAO;
    }
    
    public List<Department> getAll() {
        return departmentDAO.findAll();
    }
    
}
